#ifndef hwboard_H
#define hwboard_H

#include <boardbase.h>
#include <rte_data.h>
#include <plc_task.h>
#include "dbnc_flt.h"

// #include "flashFs.h"
extern const char *hwModel;

#define LED_RUN PF15
#define LED_ERR PG8
#define LED_ETH PG7

class hwboard : public boardBase {
public:
    hwboard();

    ~hwboard() override = default;

    int begin(u32 tick) override;


    void board_output(u32 tick) override;

    int dev_test(u32 tick) override;


    void ioled();

    void flashClear() override;

    void initReset() override;


    int get_dbg_jmpr_get() override;

    int get_rst_jmpr_get() override;


    int diag(u32 tick) override;


    void plc_run_start() override;

    void plc_run_end() override;

    int load_app() override;

    int test_hw() override;

    int Poll(u32) override;

    static void boot_mode_enter();

    static void plc_run_stop();

    static void plc_run_error();

    static void plc_run_empty();

    mem_block *get_retain() override;


    void led_run(int) override;

    void led_err(int) override;

    dbnc_flt xx_flt[44];
    u32 last_led_tick;

    void led(u32 tick) override;

    void beep(bool onoff);
    u8 plc_state{};
};


#endif
// extern FlashFs flash_fs;

